import { GET, POST ,PUT} from '@/api/index';
import Taro, { useDidShow } from '@tarojs/taro';

export const loginapi = (params) => POST('/recruit/user/login', params);
// 简历相关
export const resumedetail = ({id}) => GET(`/recruit/resume/get/${id}`, );//简历接口
export const ecruitresume  = ({id,params})=> PUT(`/recruit/resume/${id}`,params)//更新简历
export const  createmecard = ({id,params})=> POST(`/recruit/resume`,params)//创建简历

// 简历相关
export const pagekeyword = (params) => GET('/recruit/position/page/keyword', params);

export const typekeykeyword = ({type},params) => GET(`/recruit/position/page/type/${type}`,params)
// http://123.60.213.68:8088/recruit/position/page/keyword?page=0&count=12&keyword=java

export const position = ({id}) => GET(`/recruit/position/${id}`,); //我的接口

export const favor = (params) => POST(`/recruit/favor`,params); //收藏 接口  

export const application = ({positionId,userId},params) => POST(`/recruit/application?positionId=${positionId}&userId=${userId}`,params); //投递接口

export const typeshow = () => GET('/recruit/type/show')//获取职位类型


export const recruitfavor  = ({id})=> GET(`/recruit/favor/${id}`,) //收藏列表

export const applylist  = ({id,userId,count,page})=> GET(`/recruit/application/page/find/${id}?userId=${userId}&count=${count}&page=${page}`,) //申请列表

export const userLogin  = ({code})=> GET(`/dy/user/login?code=${code}`,) //收藏列表

export const favorsee = (params) => POST(`/recruit/favor/see`,params); //查看个人收藏  

export const lookapplication = ({positionId,userId}) => GET(`/recruit/application?positionId=${positionId}&userId=${userId}`); //查看个人收藏  
export const getuserinfo = () => GET('/recruit/user/information')//获取userinfo